package main

import (
	"github.com/gotk3/gotk3/gtk"
	"log"
)

func main() {
	gtk.Init(nil)

	// 创建主窗口
	win, err := gtk.WindowNew(gtk.WINDOW_TOPLEVEL)
	if err != nil {
		log.Fatal("Unable to create window:", err)
	}
	win.SetTitle("Gotk3 Example")
	win.Connect("destroy", func() {
		gtk.MainQuit()
	})

	// 显示窗口
	win.ShowAll()
	gtk.Main() // 进入事件循环
}
